package com.ruoyi.dingtalk;

import cn.hutool.core.date.TimeInterval;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import com.ruoyi.dingtalk.model.Token;
import com.ruoyi.dingtalk.model.UserInfo;

import java.util.List;

public class TestDmoe001 {


    public static void main(String[] args) {
        TimeInterval timer = new TimeInterval();
        Token token = ApiUtils.gettoken();
        ApiUtils.setAccessToken(token.getAccess_token());
//        List<UserInfo> userInfos = ApiUtils.deptUserAll();
//        System.out.println(userInfos);
//        System.out.println(userInfos.size());
//        System.out.println(ApiUtils.userCount());
//        System.out.println(ApiUtils.asyncsendText2User("221121015521483776","测试信息通知111110"));
        System.out.println(ApiUtils.asyncsendActionCard2User("221121015521483776","测试标题","# 审批流程通知\n" +
                "## 当前学生退学人员名称 : xxx\n" +
                "### 请您尽快进行审批","查看详情","http://www.baidu.com"));
        System.out.println(timer.interval());
    }
}
